Skip to content

feat: pyauto-status shell function for cross-repo drift dashboard - #3

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/pyauto-status-shell
Apr 27, 2026
Merged

feat: pyauto-status shell function for cross-repo drift dashboard#3
Jammy2211 merged 1 commit into
mainfrom
feature/pyauto-status-shell

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds a cross-repo git sync dashboard (pyauto-status) to PyAutoPrompt — a sourceable shell function that prints behind/ahead/dirty/upstream state for every git repo under ~/Code/PyAutoLabs/ in under 5 seconds. Designed to be sourced from ~/.bashrc and called automatically after the PyAuto venv-activation aliases so the user always sees drift state before starting work. Closes #2.

API Changes

None — internal changes only. PyAutoPrompt has no public Python API; this PR only adds shell tooling.

Test Plan

  • source PyAutoPrompt/scripts/pyauto_status.sh && pyauto-status from a fresh shell completes in <10s.
  • All ~21 repos under ~/Code/PyAutoLabs/ appear in one screen.
  • A repo on a non-default branch is visible without auto-checkout.
  • A repo with no upstream is shown as NONE with a ! flag.
  • bash PyAutoPrompt/scripts/status.sh --repos prints the same dashboard via the existing status.sh entry point.
  • bash PyAutoPrompt/scripts/status.sh (no args) still prints the prompt-registry dashboard unchanged.
Implementation details

Files Added

  • scripts/pyauto_status.sh — new sourceable shell file defining pyauto-status().

Files Modified

  • scripts/status.sh — added --repos arg handling near the top that sources pyauto_status.sh and runs pyauto-status, then exits. Default and --full behaviour unchanged.

Out of scope (handled by other prompts in autoprompt/)

  • Auto-pulling drift — covered by prompt 05 (/sync slash command).
  • Pretty colors / TUI — explicitly excluded in the prompt.

Personal env (out of PR, applied separately to ~/.bashrc)

  • source line so the function is available in every shell.
  • pyauto-status call appended to the PyAuto, PyAutoGPU, PyAutoNoJAX venv-activation functions so the dashboard prints automatically after entering the workspace.

Naming-clash note

There is already a /pyauto-status slash command (PyAutoPrompt/skills/pyauto-status/) that prints the workflow-registry dashboard (planned / active / complete tasks). The shell function reuses the name in the terminal namespace for git drift. Different surfaces, no collision — but the docstring at the top of pyauto_status.sh calls this out for future-readers.

🤖 Generated with Claude Code

Add scripts/pyauto_status.sh defining a `pyauto-status` shell function
that prints a one-line-per-repo dashboard for every git repo under
~/Code/PyAutoLabs/: branch, upstream tracking ref, behind/ahead counts
vs @{u}, dirty file count, and a single-glyph flag column. Fetches run
in parallel — full sweep of ~21 repos completes in under 5s on cold
cache.

Handles the failure modes the 2026-04-27 audit surfaced:
- missing upstream  -> prints NONE and `!` flag (don't crash)
- non-default upstream -> uses @{u}, not hard-coded origin/main
- non-git directories -> skipped cleanly
- fetch failures -> marked `!`, sweep continues

Also extends scripts/status.sh with a `--repos` flag that delegates to
`pyauto-status` so existing users of status.sh have a one-stop entry
point.

Closes #2

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 0e5dcf6 into main Apr 27, 2026
@Jammy2211
Jammy2211 deleted the feature/pyauto-status-shell branch April 27, 2026 20:22
Jammy2211 pushed a commit that referenced this pull request Jul 8, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 8, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 8, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 10, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 10, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 10, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 17, 2026
…iterature corpus, all validation green

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Jammy2211 pushed a commit that referenced this pull request Jul 17, 2026
…egs 1-3 hold

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: pyauto-status shell function for cross-repo drift dashboard

1 participant